{% extends 'layouts/default.html' %}
{% import 'scaffolding/macros.html' as s with context %}
{% import 'macros/list.html' as layout with context %}
{% import 'macros/buttons.html' as buttons with context %}


{% block layout_head_title %} - {{ scaffolding.plural }}{% endblock %}

{% block layout_content %}

    {% block list_header %}
        {{ layout.query_options() }}
    {% endblock %}

    <br>

    <table class="table table-striped table-hover table-condensed">
        <thead>
            <tr>
                {% block table_head %}
                {% endblock %}
            </tr>
        </thead>
        <tbody>
            {% if context[scaffolding.plural] %}
                {% block table_body %}
                {% endblock %}
            {% endif %}
        </tbody>
    </table>

    {% if context[scaffolding.plural] %}
        {{ s.next_page_link() }}
    {% else %}
        <div class="alert alert-warning text-center">no results found</div>
    {% endif %}

{% endblock %}
